<?php
/**
 * Created by PhpStorm.
 * User: fangwei
 * Date: 2019-08-21
 * Time: 11:04
 */

namespace App\Http\Controllers\Admin\View;


use App\Http\Controllers\Controller;
use App\Http\Repositories\Services\IHouse;

class HouseController extends Controller
{
    protected $houseService;
    public function __construct(IHouse $houseService)
    {
        $this->houseService = $houseService;
    }

    public function index(){
        return view('admin.house.index');
    }

    public function store(){
        return view('admin.house.create');
    }

    public function update($id){
        $dao = $this->houseService->byId($id);
        return view('admin.house.edit',['dao'=>$dao]);
    }
}